import urllib.parse

s1 = '%E9%B9%BF%E4%B9%83'
print(urllib.parse.unquote(s1))

s2 = {'qs':'鹿乃','爱':'lyc'}
print(urllib.parse.urlencode(s2))